﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using CanDoo.Data.Entity;
using CanDoo.Oil.Core.Models;

namespace CanDoo.Oil.Core.ModelConfigurations
{
    /// <summary>
    /// 实体类-数据表映射——店铺活动
    /// </summary>
    public class StoreActivityConfiguration : EntityConfigurationBase<StoreActivity>
    {
        /// <summary>
        /// 初始化一个<see cref="StoreActivityConfiguration"/>类型的新实例
        /// </summary>
        public StoreActivityConfiguration()
        {
             ToTable("oil_StoreActivity");
            this.HasOptional(p => p.Customer).WithMany(p=>p.StoreActivities).HasForeignKey(p => p.CustomerId);
        }
    }
}
